<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE HTML>
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<title>获取code页面</title>
		<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
		<script src="resources/js/jquery-1.8.2.min.js"></script>
		<script type="text/javascript">
			$(document).ready(function () {
				getCode();
			});
			function getCode()
			{
				//构造参数对象并初始化 
			    var value; 
			    var str=location.href;//获得浏览器地址栏URL串 
			    var num=str.indexOf("?"); 
			    str=str.substr(num+1);//截取“?”后面的参数串 
			    var arrtmp=str.split("&");//将各参数分离形成参数数组 
			    num=arrtmp[0].indexOf("="); 
			    value=arrtmp[0].substr(num+1);//取得参数值 
			    $("#txt").val(value);
				$("#mainForm").submit();
			}
		</script>
	</head>
	<body>
		<form id="mainForm" action="getUserInfo.do" method="post">
			<input type="hidden" id="txt" name="code" value=""/>
		</form>
	</body>
</html>